# Prints a summary of openPMD-api options at the end of the CMake configuration
#
function(openpmd_print_summary)
    message("")
    message("openPMD build configuration:")
    message("  library Version: ${openPMD_VERSION}")
    message("  openPMD Standard: ${openPMD_STANDARD_VERSION}")
    message("  C++ Compiler: ${CMAKE_CXX_COMPILER_ID} "
                            "${CMAKE_CXX_COMPILER_VERSION} "
                            "${CMAKE_CXX_COMPILER_WRAPPER}")
    message("    ${CMAKE_CXX_COMPILER}")
    message("")
    if(openPMD_INSTALL)
        message("  Install with RPATHs: ${openPMD_INSTALL_RPATH}")
        message("  Installation prefix: ${openPMD_INSTALL_PREFIX}")
        message("        bin: ${openPMD_INSTALL_BINDIR}")
        message("        lib: ${openPMD_INSTALL_LIBDIR}")
        message("    include: ${openPMD_INSTALL_INCLUDEDIR}")
        message("      cmake: ${openPMD_INSTALL_CMAKEDIR}")
        if(openPMD_HAVE_PYTHON)
            message("     python: ${openPMD_INSTALL_PYTHONDIR}")
        endif()
    else()
        message("  Installation: OFF")
    endif()
    message("")
    message("  Build Type: ${CMAKE_BUILD_TYPE}")
    if(openPMD_BUILD_SHARED_LIBS)
        message("  Library: shared")
    else()
        message("  Library: static")
    endif()
    message("  CLI Tools: ${openPMD_BUILD_CLI_TOOLS}")
    message("  Examples: ${openPMD_BUILD_EXAMPLES}")
    message("  Testing: ${openPMD_BUILD_TESTING}")
    message("  Invasive Tests: ${openPMD_USE_INVASIVE_TESTS}")
    message("  Internal VERIFY: ${openPMD_USE_VERIFY}")
    message("  Build Options:")

    foreach(opt IN LISTS openPMD_CONFIG_OPTIONS)
      if(${openPMD_HAVE_${opt}})
        message("    ${opt}: ON")
      else()
        message("    ${opt}: OFF")
      endif()
    endforeach()
    message("")
endfunction()
